cmake_minimum_required(VERSION 3.5)

project(demo1 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(OpenGL_GL_PREFERENCE GLVND)
set(GLFW_LIBS "/usr/lib/x86_64-linux-gnu/libglfw.so.3")
find_package( OpenGL  REQUIRED)
find_package( glfw3 REQUIRED )
find_package( GLEW REQUIRED )

add_executable(demo1 main.cpp)
target_link_libraries( demo1 ${GLFW_LIBS} GLEW GL )